package com.powernode.commons;

/**
 * @author X
 * @DATE 2021/10/28 19:58
 * @DESC 自定义异常
 */
public class ResultException extends RuntimeException {

    private int code;

    private String message;

    public ResultException(ResultEnum message) {
        super(message.getMessage());
        this.code = message.getCode();
        this.message = message.getMessage();
    }

    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
